package com.pkk.penguin.frame.know.java.driven.condition.importbean.importselector;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @description: 自定义导入的组件
 * @author: peikunkun
 * @create: 2020-07-31 15:17
 **/
public class MyImportSelector implements ImportSelector, ImportInterface {

  /**
   * Select and return the names of which class(es) should be imported based on the {@link AnnotationMetadata} of the
   * importing @{@link Configuration} class.
   *
   * @param importingClassMetadata:获取标注的类的所有注解的配置信息
   */
  @Override
  public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    return new String[]{
        "com.pkk.penguin.frame.know.java.driven.condition.importbean.importselector.ImportSelectorBeanOne"};
  }

  /**
   * @return
   */
  @Override
  public String readme() {
    return this.getClass().getSimpleName();
  }
}
